<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<html>
<head>
<title>AutoWinter: Login</title>
<%@include file="../includes/commonHead.jspf"%>
<link href="resources/css/signin.css" rel="stylesheet">
</head>
<body>

	<security:authorize access="hasRole('ROLE_USER')">
		<c:redirect url="home" />
	</security:authorize>

	<div class="container">
		<form class="form-signin" method="POST"
			action="<c:url value="/j_spring_security_check" />">
			<c:if test="${not empty param.error}">
				<font color="red"> Authorization error <!--  :
					${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message} --></font>
			</c:if>
			<h2 class="form-signin-heading">Please sign in</h2>
			<input type="text" class="form-control" placeholder="Login"
				autofocus="autofocus" name="j_username"> <input
				type="password" class="form-control" placeholder="Password"
				name="j_password"> <label class="checkbox"> <input
				type="checkbox" value="remember-me"
				name="_spring_security_remember_me"> Remember me
			</label>
			<button class="btn btn-lg btn-primary btn-block" type="submit">Sign
				in</button>
		</form>
	</div>

	<%@include file="../includes/commonTail.jspf"%>
</body>
</html>